package com.zhou.utils;

/**
 * @Description : 封装好的判断类
 * @Author : zyy
 * @Date: 2024/6/13  14:09
 */
public class BeanChangeUtils {
    /**
     * 判断传参是否为空
     * @param obj
     * @return
     */
    public static boolean isEmpty(Object obj) {
        if (obj == null) {
            return true;
        }
        if (obj instanceof String) {
            return ((String) obj).trim().length() == 0;
        }
        return false;
    }

    /**
     * 判断传参是否不为空
     * @param obj
     * @return
     */
    public static boolean isNotEmpty(Object obj) {
        return !isEmpty(obj);
    }
}
